<?php


namespace app\backend\controller;


use app\backend\service\CountDayService;

class CountDay extends Backend
{
    /**
     * 每日统计
     * @param CountDayService $service
     * @return string|\think\response\Json
     */
    public function index(CountDayService $service)
    {
        if ($this->request->isAjax()) {
            $data = $service->lists($this->request->param());
            return $this->success($data);
        }
        return $this->fetch();
    }

    /**
     * 手动输入
     * @param CountDayService $service
     * @return string|\think\response\Json
     */
    public function editRowField(CountDayService $service)
    {
        return $this->success($service->editRowField($this->request->param()));
    }
}